from pydantic import BaseModel
from typing import Optional, Any, Generic, TypeVar

T = TypeVar('T')


class StandardResponse(BaseModel, Generic[T]):
    code: int = 200
    message: str = "ok"
    result: Optional[T] = None


class ChatRequest(BaseModel):
    prompt: str
    stream: bool = False


class AnalysisRequest(BaseModel):
    prompt: str


class AnalysisResult(BaseModel):
    text: str


class PlanningRequest(BaseModel):
    prompt: str


class PlanningResult(BaseModel):
    text: str
